package cn.edu.zut.hhr.config;

import org.apache.ibatis.session.ExecutorType;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

@Configuration
public class MybatisPlusConfig {

    @Bean(name = "batchSqlSession")
    public SqlSession batchSqlSession(SqlSessionFactory sf){
        return sf.openSession(ExecutorType.BATCH);
    }

}
